package com.nc.delivery_project.server.domain;

/**
 * Created by miroshnik on 01.12.14.
 */
public class City {
	
	private int cityId;

    private String cityTitle;
    
    private StateProvince statePr;
 

	public City() {
		
	}

	public City(int cityId) {
		super();
		this.cityId = cityId;
	}
	
	public City(int cityId, StateProvince statePr) {
		super();
		this.cityId = cityId;
		this.statePr = statePr;
	}
	
	public City(int cityId, String cityTitle, StateProvince statePr) {
		super();
		this.cityId = cityId;
		this.cityTitle = cityTitle;
		this.statePr = statePr;
	}


	public int getCityId() {
		return cityId;
	}


	public void setCityId(int cityId) {
		this.cityId = cityId;
	}


	public String getCityTitle() {
		return cityTitle;
	}


	public void setCityTitle(String cityTitle) {
		this.cityTitle = cityTitle;
	}


	public StateProvince getStatePr() {
		return statePr;
	}


	public void setStatePr(StateProvince statePr) {
		this.statePr = statePr;
	}

	
	 @Override
	    public boolean equals(Object o) {
	        if (this == o) return true;
	        if (!(o instanceof City)) return false;

	        City city = (City) o;

	        if (cityTitle!=null?!cityTitle.equals(city.cityTitle):city.cityTitle!= null) return false;
	        if (statePr != null ? !statePr.equals(city.statePr) : city.statePr != null) return false;

	        return true;
	    }

	    @Override
	    public int hashCode() {
	        int result = cityId;
	        result = 31 * result + (cityTitle != null ? cityTitle.hashCode():0);
	        result = 31 * result + (statePr != null ? statePr.hashCode() : 0);
	        return result;
	    }

	    @Override
	    public String toString() {
	        final StringBuilder sb = new StringBuilder("City{");
	        sb.append("cityId=").append(cityId);
	        sb.append(", cityTitle='").append(cityTitle).append('\'');
	        sb.append(", statePr=").append(statePr);
	        sb.append('}');
	        return sb.toString();
	    }
	
    

	
}
